<div class="page-body">
    <!--<a class="btn btn-default purple" href="{:U('add')}" style="margin-bottom: 15px;"><i class="fa fa-plus"></i>-->
    <!--新增图书-->
    <!--</a>-->
    <div class="row">
        <div class="col-lg-6 col-sm-6 col-xs-12">
            <div class="tabbable tabs-left">
                <ul class="nav nav-tabs" id="myTab3">
                    <li class="tab-red active">
                        <a data-toggle="tab" href="#tab1">
                            增加-导入
                        </a>
                    </li>
                    <li class="tab-sky ">
                        <a data-toggle="tab" href="#tab2">
                            覆盖-导入
                        </a>
                    </li>
                    <li class="tab-sky ">
                        <a data-toggle="tab" href="#tab3">
                            库存转入单-导入
                        </a>
                    </li>
                    <li class="tab-sky ">
                        <a data-toggle="tab" href="#tab4">
                            库存转出单-导入
                        </a>
                    </li>
                </ul>

                <div class="tab-content">
                    <div id="tab1" class="widget-body bg-lightred tab-pane active">
                            <form action="{:U('import_add')}" method="post" enctype="multipart/form-data">
                                <input type="file" name="excel" style="display: inline">
                                <button class="btn btn-default maroon" type="submit">确认导入-增加</button>
                                <br>
                                <span>注:此处导入不会覆盖图书信息，只新增借阅库存及购书库存</span>
                            </form>
                    </div>
                    <div id="tab2" class="widget-body bg-blue tab-pane ">
                        <form action="{:U('import_write')}" method="post" enctype="multipart/form-data">
                            <input type="file" name="excel" style="display: inline">
                            <button class="btn btn-default maroon" type="submit">确认导入-覆盖</button>
                            <br>
                            <span>注:此处导入不会覆盖图书信息，只覆盖借阅库存及购书库存</span>
                        </form>
                    </div>
                    <div id="tab3" class="widget-body bg-primary tab-pane ">
                        <form action="{:U('import_in')}" method="post" enctype="multipart/form-data">
                            <input type="file" name="excel" style="display: inline">
                            <button class="btn btn-default maroon" type="submit">确认导入</button>
                            <br>
                            <span>注:此处导入&nbsp;&nbsp;库存转入&nbsp;&nbsp;单,请注意</span>
                        </form>
                    </div>
                    <div id="tab4" class="widget-body bg-success tab-pane ">
                        <form action="{:U('import_out')}" method="post" enctype="multipart/form-data">
                            <input type="file" name="excel" style="display: inline">
                            <button class="btn btn-default maroon" type="submit">确认导入</button>
                            <br>
                            <span>注:此处导入&nbsp;&nbsp;库存转出&nbsp;&nbsp;单,请注意</span>
                        </form>
                    </div>
                </div>
            </div>
            <div class="horizontal-space"></div>
        </div>
    </div>

    <span>注:此处导入不会覆盖图书信息，只覆盖借阅库存及购书库存</span>
    <div class="row">
        <div class="col-xs-12 col-md-12">
            <div class="widget">
                <div class="widget-header ">
                    <span class="widget-caption">库存列表</span>
                    <div class="widget-buttons">
                        <a href="#" data-toggle="maximize">
                            <i class="fa fa-expand"></i>
                        </a>
                        <a href="#" data-toggle="collapse">
                            <i class="fa fa-minus"></i>
                        </a>
                        <a href="#" data-toggle="dispose">
                            <i class="fa fa-times"></i>
                        </a>
                    </div>
                </div>
                <div class="widget-body">
                    <div class="table-toolbar">
                        <form method="get" action="{:U('index')}" class="form-inline" role="form">
                            <div class="form-group">
                                <span class="input-icon" style="width: 200px;">
                                    <input type="text" class="form-control input-sm" placeholder="新华码、条码、ID、书名"
                                           name="keywords" value="{$Think.get.keywords}">
                                    <i class="glyphicon glyphicon-search blue"></i>
                                </span>
                                <button type="submit" class="btn btn-info">搜索</button>

                                <a href="{:U('export_renting')}" class="btn btn-danger">盘存导出</a>
                                <a href="{:U('export_rentingExcel')}" class="btn btn-yellow">在借数导出(Excel)</a>
                            </div>
                        </form>
                    </div>
                    <table class="table table-striped table-hover">
                        <thead>
                        <tr>
                            <th>
                                ID
                            </th>
                            <th>
                                条码
                            </th>
                            <th>
                                书名
                            </th>
                            <th>
                                类别
                            </th>
                            <th>
                                定价
                            </th>
                            <th> 借阅库存</th>
                            <th> 购书库存</th>
                            <th>排序</th>
                            <th></th>
                        </tr>
                        </thead>

                        <tbody>
                        <foreach name="data" item="v">
                            <tr>
                                <td>
                                    {$v.book_id}
                                </td>
                                <td>
                                    条码：{$v.tm}<br>
                                    新华码：{$v.spbs}
                                </td>
                                <td>
                                    <img src="{$v.b_logo}" width="100"><br>
                                    书名：{$v.sm}<br>
                                    作者：{$v.zyz}
                                </td>
                                <td>
                                    <foreach name="v.book_type" item="book_type">
                                        {$book_type.p_name}：{$book_type.name}<br>
                                    </foreach>
                                </td>
                                <td>
                                    {$v.dj}
                                </td>
                                <td>
                                    {$v.stock_rent}<br>
                                    <!--<a class="btn btn-danger btn-xs del-btn" href="javascript:;"-->
                                       <!--data-href="{:U('del',array('book_id'=>$v['book_id']))}"><i-->
                                            <!--class="fa fa-trash-o"></i>库存清除</a>-->
                                </td>
                                <td>
                                    {$v.stock_buy}<br>
                                    <!--<a class="btn btn-danger btn-xs del-btn" href="javascript:;"-->
                                       <!--data-href="{:U('del',array('book_id'=>$v['book_id']))}">-->
                                        <!--<i class="fa fa-trash-o"></i>库存清除</a>-->
                                </td>
                                <td>{$v.sort}</td>
                                <td>
                                    <a class="btn btn-info btn-sm"
                                       href="{:U('edit',array('book_id'=>$v['book_id']))}">
                                        <i class="fa fa-edit"></i> 库存调整
                                    </a>
                                </td>
                            </tr>
                        </foreach>
                        </tbody>
                    </table>
                    {$page}
                    <form class="form-inline" method="post">
                        <div class="form-group">
                            <div class="input-group">
                                <div class="input-group-addon">设置页码</div>
                                <input class="form-control" type="text" placeholder="" name="p" value="{$Think.get.p}" style="width: 60px;">
                            </div>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>